home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / info / emacs-16.z / emacs-16
Encoding:
GNU Info File  |  1998-10-28  |  48.5 KB  |  1,208 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.63 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Rmail Output,  Next: Rmail Labels,  Prev: Rmail Files,  Up: Rmail
  6.  
  7. Copying Messages Out to Files
  8. =============================
  9.  
  10.    These commands copy messages from an Rmail file into another file.
  11.  
  12. `o FILE RET'
  13.      Append a copy of the current message to the file FILE, using Rmail
  14.      file format by default (`rmail-output-to-rmail-file').
  15.  
  16. `C-o FILE RET'
  17.      Append a copy of the current message to the file FILE, using
  18.      system inbox file format by default (`rmail-output').
  19.  
  20.    The commands `o' and `C-o' copy the current message into a specified
  21. file.  This file may be an Rmail file or it may be in system inbox
  22. format; the output commands ascertain the file's format and write the
  23. copied message in that format.
  24.  
  25.    The `o' and `C-o' commands differ in two ways: each has its own
  26. separate default file name, and each specifies a choice of format to
  27. use when the file does not already exist.  The `o' command uses Rmail
  28. format when it creates a new file, while `C-o' uses system inbox format
  29. for a new file.  The default file name for `o' is the file name used
  30. last with `o', and the default file name for `C-o' is the file name
  31. used last with `C-o'.
  32.  
  33.    If the output file is an Rmail file currently visited in an Emacs
  34. buffer, the output commands copy the message into that buffer.  It is
  35. up to you to save the buffer eventually in its file.
  36.  
  37.    You can also output a message to an Rmail file chosen with a menu.
  38. Choose first the menu bar Classify item, then from the Classify menu
  39. choose the Output Rmail Menu item; then choose the Rmail file you want.
  40. This outputs the current message to that file, like the `o' command.
  41. The variables `rmail-secondary-file-directory' and
  42. `rmail-secondary-file-regexp' specify which files to offer in the menu:
  43. the first variable says which directory to find them in; the second
  44. says which files in that directory to offer (all those that match the
  45. regular expression).
  46.  
  47.    Copying a message gives the original copy of the message the `filed'
  48. attribute, so that `filed' appears in the mode line when such a message
  49. is current.  If you like to keep just a single copy of every mail
  50. message, set the variable `rmail-delete-after-output' to `t'; then the
  51. `o' and `C-o' commands delete the original message after copying it.
  52. (You can undelete the original afterward if you wish.)
  53.  
  54.    Copying messages into files in system inbox format uses the header
  55. fields that are displayed in Rmail at the time.  Thus, if you use the
  56. `t' command to view the entire header and then copy the message, the
  57. entire header is copied.  *Note Rmail Display::.
  58.  
  59.    The variable `rmail-output-file-alist' lets you specify intelligent
  60. defaults for the output file, based on the contents of the current
  61. message.  The value should be a list whose elements have this form:
  62.  
  63.      (REGEXP . NAME-EXP)
  64.  
  65. If there's a match for REGEXP in the current message, then the default
  66. file name for output is NAME-EXP.  If multiple elements match the
  67. message, the first matching element decides the default file name.  The
  68. subexpression NAME-EXP may be a string constant giving the file name to
  69. use, or more generally it may be any Lisp expression that returns a
  70. file name as a string.  `rmail-output-file-alist' applies to both `o'
  71. and `C-o'.
  72.  
  73. 
  74. File: emacs,  Node: Rmail Labels,  Next: Rmail Reply,  Prev: Rmail Output,  Up: Rmail
  75.  
  76. Labels
  77. ======
  78.  
  79.    Each message can have various "labels" assigned to it as a means of
  80. classification.  Each label has a name; different names are different
  81. labels.  Any given label is either present or absent on a particular
  82. message.  A few label names have standard meanings and are given to
  83. messages automatically by Rmail when appropriate; these special labels
  84. are called "attributes".  All other labels are assigned only by users.
  85.  
  86. `a LABEL RET'
  87.      Assign the label LABEL to the current message (`rmail-add-label').
  88.  
  89. `k LABEL RET'
  90.      Remove the label LABEL from the current message
  91.      (`rmail-kill-label').
  92.  
  93. `C-M-n LABELS RET'
  94.      Move to the next message that has one of the labels LABELS
  95.      (`rmail-next-labeled-message').
  96.  
  97. `C-M-p LABELS RET'
  98.      Move to the previous message that has one of the labels LABELS
  99.      (`rmail-previous-labeled-message').
  100.  
  101. `C-M-l LABELS RET'
  102.      Make a summary of all messages containing any of the labels LABELS
  103.      (`rmail-summary-by-labels').
  104.  
  105.    The `a' (`rmail-add-label') and `k' (`rmail-kill-label') commands
  106. allow you to assign or remove any label on the current message.  If the
  107. LABEL argument is empty, it means to assign or remove the same label
  108. most recently assigned or removed.
  109.  
  110.    Once you have given messages labels to classify them as you wish,
  111. there are two ways to use the labels: in moving and in summaries.
  112.  
  113.    The command `C-M-n LABELS RET' (`rmail-next-labeled-message') moves
  114. to the next message that has one of the labels LABELS.  The argument
  115. LABELS specifies one or more label names, separated by commas.  `C-M-p'
  116. (`rmail-previous-labeled-message') is similar, but moves backwards to
  117. previous messages.  A numeric argument to either command serves as a
  118. repeat count.
  119.  
  120.    The command `C-M-l LABELS RET' (`rmail-summary-by-labels') displays
  121. a summary containing only the messages that have at least one of a
  122. specified set of labels.  The argument LABELS is one or more label
  123. names, separated by commas.  *Note Rmail Summary::, for information on
  124. summaries.
  125.  
  126.    If the LABELS argument to `C-M-n', `C-M-p' or `C-M-l' is empty, it
  127. means to use the last set of labels specified for any of these commands.
  128.  
  129.    Some labels such as `deleted' and `filed' have built-in meanings and
  130. are assigned to or removed from messages automatically at appropriate
  131. times; these labels are called "attributes".  Here is a list of Rmail
  132. attributes:
  133.  
  134. `unseen'
  135.      Means the message has never been current.  Assigned to messages
  136.      when they come from an inbox file, and removed when a message is
  137.      made current.  When you start Rmail, it initially shows the first
  138.      message that has this attribute.
  139.  
  140. `deleted'
  141.      Means the message is deleted.  Assigned by deletion commands and
  142.      removed by undeletion commands (*note Rmail Deletion::.).
  143.  
  144. `filed'
  145.      Means the message has been copied to some other file.  Assigned by
  146.      the file output commands (*note Rmail Files::.).
  147.  
  148. `answered'
  149.      Means you have mailed an answer to the message.  Assigned by the
  150.      `r' command (`rmail-reply').  *Note Rmail Reply::.
  151.  
  152. `forwarded'
  153.      Means you have forwarded the message.  Assigned by the `f' command
  154.      (`rmail-forward').  *Note Rmail Reply::.
  155.  
  156. `edited'
  157.      Means you have edited the text of the message within Rmail.  *Note
  158.      Rmail Editing::.
  159.  
  160. `resent'
  161.      Means you have resent the message.  Assigned by the command `M-x
  162.      rmail-resend'.  *Note Rmail Reply::.
  163.  
  164.    All other labels are assigned or removed only by the user, and have
  165. no standard meaning.
  166.  
  167. 
  168. File: emacs,  Node: Rmail Reply,  Next: Rmail Summary,  Prev: Rmail Labels,  Up: Rmail
  169.  
  170. Sending Replies
  171. ===============
  172.  
  173.    Rmail has several commands that use Mail mode to send outgoing mail.
  174. *Note Sending Mail::, for information on using Mail mode.  What are
  175. documented here are the special commands of Rmail for entering Mail
  176. mode.  Note that the usual keys for sending mail--`C-x m', `C-x 4 m',
  177. and `C-x 5 m'--are available in Rmail mode and work just as they
  178. usually do.
  179.  
  180. `m'
  181.      Send a message (`rmail-mail').
  182.  
  183. `c'
  184.      Continue editing already started outgoing message
  185.      (`rmail-continue').
  186.  
  187. `r'
  188.      Send a reply to the current Rmail message (`rmail-reply').
  189.  
  190. `f'
  191.      Forward current message to other users (`rmail-forward').
  192.  
  193. `C-u f'
  194.      Resend the current message to other users (`rmail-resend').
  195.  
  196. `M-m'
  197.      Try sending a bounced message a second time
  198.      (`rmail-retry-failure').
  199.  
  200.    The most common reason to send a message while in Rmail is to reply
  201. to the message you are reading.  To do this, type `r' (`rmail-reply').
  202. This displays the `*mail*' buffer in another window, much like `C-x 4
  203. m', but preinitializes the `Subject', `To', `CC' and `In-reply-to'
  204. header fields based on the message you are replying to.  The `To' field
  205. starts out as the address of the person who sent the message you
  206. received, and the `CC' field starts out with all the other recipients
  207. of that message.
  208.  
  209.    You can exclude certain recipients from being placed automatically in
  210. the `CC', using the variable `rmail-dont-reply-to-names'.  Its value
  211. should be a regular expression (as a string); any recipient that the
  212. regular expression matches, is excluded from the `CC' field.  The
  213. default value matches your own name, and any name starting with
  214. `info-'.  (Those names are excluded because there is a convention of
  215. using them for large mailing lists to broadcast announcements.)
  216.  
  217.    To omit the `CC' field completely for a particular reply, enter the
  218. reply command with a numeric argument: `C-u r' or `1 r'.
  219.  
  220.    Once the `*mail*' buffer has been initialized, editing and sending
  221. the mail goes as usual (*note Sending Mail::.).  You can edit the
  222. presupplied header fields if they are not right for you.  You can also
  223. use the commands of Mail mode (*note Mail Mode::.), including `C-c C-y'
  224. which yanks in the message that you are replying to.  You can switch to
  225. the Rmail buffer, select a different message there, switch back, and
  226. yank the new current message.
  227.  
  228.    Sometimes a message does not reach its destination.  Mailers usually
  229. send the failed message back to you, enclosed in a "failure message".
  230. The Rmail command `M-m' (`rmail-retry-failure') prepares to send the
  231. same message a second time: it sets up a `*mail*' buffer with the same
  232. text and header fields as before.  If you type `C-c C-c' right away,
  233. you send the message again exactly the same as the first time.
  234. Alternatively, you can edit the text or headers and then send it.  The
  235. variable `rmail-retry-ignored-headers', in the same format as
  236. `rmail-ignored-headers' (*note Rmail Display::.), controls which
  237. headers are stripped from the failed message when retrying it; it
  238. defaults to nil.
  239.  
  240.    Another frequent reason to send mail in Rmail is to "forward" the
  241. current message to other users.  `f' (`rmail-forward') makes this easy
  242. by preinitializing the `*mail*' buffer with the current message as the
  243. text, and a subject designating a forwarded message.  All you have to
  244. do is fill in the recipients and send.  When you forward a message,
  245. recipients get a message which is "from" you, and which has the
  246. original message in its contents.
  247.  
  248.    Forwarding a message encloses it between two delimiter lines.  It
  249. also modifies every line that starts with a dash, by inserting `- ' at
  250. the start of the line.  When you receive a forwarded message, if it
  251. contains something besides ordinary text--for example, program source
  252. code--you might find it useful to undo that transformation.  You can do
  253. this by selecting the forwarded message and typing `M-x
  254. unforward-rmail-message'.  This command extracts the original forwarded
  255. message, deleting the inserted `- ' strings, and inserts it into the
  256. Rmail file as a separate message immediately following the current one.
  257.  
  258.    "Resending" is an alternative similar to forwarding; the difference
  259. is that resending sends a message that is "from" the original sender,
  260. just as it reached you--with a few added header fields `Resent-from'
  261. and `Resent-to' to indicate that it came via you.  To resend a message
  262. in Rmail, use `C-u f'.  (`f' runs `rmail-forward', which is programmed
  263. to invoke `rmail-resend' if you provide a numeric argument.)
  264.  
  265.    The `m' (`rmail-mail') command is used to start editing an outgoing
  266. message that is not a reply.  It leaves the header fields empty.  Its
  267. only difference from `C-x 4 m' is that it makes the Rmail buffer
  268. accessible for `C-c C-y', just as `r' does.  Thus, `m' can be used to
  269. reply to or forward a message; it can do anything `r' or `f' can do.
  270.  
  271.    The `c' (`rmail-continue') command resumes editing the `*mail*'
  272. buffer, to finish editing an outgoing message you were already
  273. composing, or to alter a message you have sent.
  274.  
  275.    If you set the variable `rmail-mail-new-frame' to a non-`nil' value,
  276. then all the Rmail commands to start sending a message create a new
  277. frame to edit it in.  This frame is deleted when you send the message,
  278. or when you use the `Don't Send' item in the `Mail' menu.
  279.  
  280. 
  281. File: emacs,  Node: Rmail Summary,  Next: Rmail Sorting,  Prev: Rmail Reply,  Up: Rmail
  282.  
  283. Summaries
  284. =========
  285.  
  286.    A "summary" is a buffer containing one line per message to give you
  287. an overview of the mail in an Rmail file.  Each line shows the message
  288. number, the sender, the labels, and the subject.  Almost all Rmail
  289. commands are valid in the summary buffer also; these apply to the
  290. message described by the current line of the summary.  Moving point in
  291. the summary buffer selects messages as you move to their summary lines.
  292.  
  293.    A summary buffer applies to a single Rmail file only; if you are
  294. editing multiple Rmail files, each one can have its own summary buffer.
  295. The summary buffer name is made by appending `-summary' to the Rmail
  296. buffer's name.  Normally only one summary buffer is displayed at a time.
  297.  
  298. * Menu:
  299.  
  300. * Rmail Make Summary::         Making various sorts of summaries.
  301. * Rmail Summary Edit::         Manipulating messages from the summary.
  302.  
  303. 
  304. File: emacs,  Node: Rmail Make Summary,  Next: Rmail Summary Edit,  Up: Rmail Summary
  305.  
  306. Making Summaries
  307. ----------------
  308.  
  309.    Here are the commands to create a summary for the current Rmail file.
  310. Once the Rmail file has a summary buffer, changes in the Rmail file
  311. (such as deleting or expunging messages, and getting new mail)
  312. automatically update the summary.
  313.  
  314. `h'
  315. `C-M-h'
  316.      Summarize all messages (`rmail-summary').
  317.  
  318. `l LABELS RET'
  319. `C-M-l LABELS RET'
  320.      Summarize message that have one or more of the specified labels
  321.      (`rmail-summary-by-labels').
  322.  
  323. `C-M-r RCPTS RET'
  324.      Summarize messages that have one or more of the specified
  325.      recipients (`rmail-summary-by-recipients').
  326.  
  327. `C-M-t TOPIC RET'
  328.      Summarize messages that have a match for the specified regexp
  329.      TOPIC in their subjects (`rmail-summary-by-topic').
  330.  
  331.    The `h' or `C-M-h' (`rmail-summary') command fills the summary buffer
  332. for the current Rmail file with a summary of all the messages in the
  333. file.  It then displays and selects the summary buffer in another
  334. window.
  335.  
  336.    `C-M-l LABELS RET' (`rmail-summary-by-labels') makes a partial
  337. summary mentioning only the messages that have one or more of the
  338. labels LABELS.  LABELS should contain label names separated by commas.
  339.  
  340.    `C-M-r RCPTS RET' (`rmail-summary-by-recipients') makes a partial
  341. summary mentioning only the messages that have one or more of the
  342. recipients RCPTS.  RCPTS should contain mailing addresses separated by
  343. commas.
  344.  
  345.    `C-M-t TOPIC RET' (`rmail-summary-by-topic') makes a partial summary
  346. mentioning only the messages whose subjects have a match for the
  347. regular expression TOPIC.
  348.  
  349.    Note that there is only one summary buffer for any Rmail file;
  350. making one kind of summary discards any previously made summary.
  351.  
  352.    The variable `rmail-summary-window-size' says how many lines to use
  353. for the summary window.
  354.  
  355. 
  356. File: emacs,  Node: Rmail Summary Edit,  Prev: Rmail Make Summary,  Up: Rmail Summary
  357.  
  358. Editing in Summaries
  359. --------------------
  360.  
  361.    You can use the Rmail summary buffer to do almost anything you can do
  362. in the Rmail buffer itself.  In fact, once you have a summary buffer,
  363. there's no need to switch back to the Rmail buffer.
  364.  
  365.    You can select and display various messages in the Rmail buffer, from
  366. the summary buffer, just by moving point in the summary buffer to
  367. different lines.  It doesn't matter what Emacs command you use to move
  368. point; whichever line point is on at the end of the command, that
  369. message is selected in the Rmail buffer.
  370.  
  371.    Almost all Rmail commands work in the summary buffer as well as in
  372. the Rmail buffer.  Thus, `d' in the summary buffer deletes the current
  373. message, `u' undeletes, and `x' expunges.  `o' and `C-o' output the
  374. current message to a file; `r' starts a reply to it.  You can scroll
  375. the current message while remaining in the summary buffer using SPC and
  376. DEL.
  377.  
  378.    The Rmail commands to move between messages also work in the summary
  379. buffer, but with a twist: they move through the set of messages included
  380. in the summary.  They also ensure the Rmail buffer appears on the screen
  381. (unlike cursor motion commands, which update the contents of the Rmail
  382. buffer but don't display it in a window unless it already appears).
  383. Here is a list of these commands:
  384.  
  385. `n'
  386.      Move to next line, skipping lines saying `deleted', and select its
  387.      message.
  388.  
  389. `p'
  390.      Move to previous line, skipping lines saying `deleted', and select
  391.      its message.
  392.  
  393. `M-n'
  394.      Move to next line and select its message.
  395.  
  396. `M-p'
  397.      Move to previous line and select its message.
  398.  
  399. `>'
  400.      Move to the last line, and select its message.
  401.  
  402. `<'
  403.      Move to the first line, and select its message.
  404.  
  405. `M-s PATTERN RET'
  406.      Search through messages for PATTERN starting with the current
  407.      message; select the message found, and move point in the summary
  408.      buffer to that message's line.
  409.  
  410.    Deletion, undeletion, and getting new mail, and even selection of a
  411. different message all update the summary buffer when you do them in the
  412. Rmail buffer.  If the variable `rmail-redisplay-summary' is non-`nil',
  413. these actions also bring the summary buffer back onto the screen.
  414.  
  415.    When you are finished using the summary, type `w'
  416. (`rmail-summary-wipe') to delete the summary buffer's window.  You can
  417. also exit Rmail while in the summary: `q' (`rmail-summary-quit')
  418. deletes the summary window, then exits from Rmail by saving the Rmail
  419. file and switching to another buffer.
  420.  
  421. 
  422. File: emacs,  Node: Rmail Sorting,  Next: Rmail Display,  Prev: Rmail Summary,  Up: Rmail
  423.  
  424. Sorting the Rmail File
  425. ======================
  426.  
  427. `M-x rmail-sort-by-date'
  428.      Sort messages of current Rmail file by date.
  429.  
  430. `M-x rmail-sort-by-subject'
  431.      Sort messages of current Rmail file by subject.
  432.  
  433. `M-x rmail-sort-by-author'
  434.      Sort messages of current Rmail file by author's name.
  435.  
  436. `M-x rmail-sort-by-recipient'
  437.      Sort messages of current Rmail file by recipient's names.
  438.  
  439. `M-x rmail-sort-by-correspondent'
  440.      Sort messages of current Rmail file by the name of the other
  441.      correspondent.
  442.  
  443. `M-x rmail-sort-by-lines'
  444.      Sort messages of current Rmail file by size (number of lines).
  445.  
  446. `M-x rmail-sort-by-keywords RET LABELS RET'
  447.      Sort messages of current Rmail file by labels.  The argument
  448.      LABELS should be a comma-separated list of labels.  The order of
  449.      these labels specifies the order of messages; messages with the
  450.      first label come first, messages with the second label come
  451.      second, and so on.  Messages which have none of these labels come
  452.      last.
  453.  
  454.    The Rmail sort commands perform a *stable sort*: if there is no
  455. reason to prefer either one of two messages, their order remains
  456. unchanged.  You can use this to sort by more than one criterion.  For
  457. example, if you use `rmail-sort-by-date' and then
  458. `rmail-sort-by-author', messages from the same author appear in order
  459. by date.
  460.  
  461.    With a numeric argument, all these commands reverse the order of
  462. comparison.  This means they sort messages from newest to oldest, from
  463. biggest to smallest, or in reverse alphabetical order.
  464.  
  465. 
  466. File: emacs,  Node: Rmail Display,  Next: Rmail Editing,  Prev: Rmail Sorting,  Up: Rmail
  467.  
  468. Display of Messages
  469. ===================
  470.  
  471.    Rmail reformats the header of each message before displaying it for
  472. the first time.  Reformatting hides uninteresting header fields to
  473. reduce clutter.  You can use the `t' command to show the entire header
  474. or to repeat the header reformatting operation.
  475.  
  476. `t'
  477.      Toggle display of complete header (`rmail-toggle-header').
  478.  
  479.    Reformatting the header involves deleting most header fields, on the
  480. grounds that they are not interesting.  The variable
  481. `rmail-ignored-headers' holds a regular expression that specifies which
  482. header fields to hide in this way--if it matches the beginning of a
  483. header field, that whole field is hidden.
  484.  
  485.    Rmail saves the complete original header before reformatting; to see
  486. it, use the `t' command (`rmail-toggle-header').  This discards the
  487. reformatted headers of the current message and displays it with the
  488. original header.  Repeating `t' reformats the message again.  Selecting
  489. the message again also reformats.
  490.  
  491.    One consequence of this is that if you edit the reformatted header
  492. (using `e'; *note Rmail Editing::.), subsequent use of `t' will discard
  493. your edits.  On the other hand, if you use `e' after `t', to edit the
  494. original (unreformatted) header, those changes are permanent.
  495.  
  496.    When used with a window system that supports multiple fonts, Rmail
  497. highlights certain header fields that are especially interesting--by
  498. default, the `From' and `Subject' fields.  The variable
  499. `rmail-highlighted-headers' holds a regular expression that specifies
  500. the header fields to highlight; if it matches the beginning of a header
  501. field, that whole field is highlighted.
  502.  
  503.    If you specify unusual colors for your text foreground and
  504. background, the colors used for highlighting may not go well with them.
  505. If so, specify different colors for the `highlight' face.  That is
  506. worth doing because the `highlight' face is used for other kinds of
  507. highlighting as well.  *Note Faces::, for how to do this.
  508.  
  509.    To turn off highlighting entirely in Rmail, set
  510. `rmail-highlighted-headers' to `nil'.
  511.  
  512. 
  513. File: emacs,  Node: Rmail Editing,  Next: Rmail Digest,  Prev: Rmail Display,  Up: Rmail
  514.  
  515. Editing Within a Message
  516. ========================
  517.  
  518.    Most of the usual Emacs commands are available in Rmail mode, though
  519. a few, such as `C-M-n' and `C-M-h', are redefined by Rmail for other
  520. purposes.  However, the Rmail buffer is normally read only, and most of
  521. the letters are redefined as Rmail commands.  If you want to edit the
  522. text of a message, you must use the Rmail command `e'.
  523.  
  524. `e'
  525.      Edit the current message as ordinary text.
  526.  
  527.    The `e' command (`rmail-edit-current-message') switches from Rmail
  528. mode into Rmail Edit mode, another major mode which is nearly the same
  529. as Text mode.  The mode line indicates this change.
  530.  
  531.    In Rmail Edit mode, letters insert themselves as usual and the Rmail
  532. commands are not available.  When you are finished editing the message
  533. and are ready to go back to Rmail, type `C-c C-c', which switches back
  534. to Rmail mode.  Alternatively, you can return to Rmail mode but cancel
  535. all the editing that you have done, by typing `C-c C-]'.
  536.  
  537.    Entering Rmail Edit mode runs the hook `text-mode-hook'; then it
  538. runs the hook `rmail-edit-mode-hook' (*note Hooks::.).  It adds the
  539. attribute `edited' to the message.
  540.  
  541. 
  542. File: emacs,  Node: Rmail Digest,  Next: Out of Rmail,  Prev: Rmail Editing,  Up: Rmail
  543.  
  544. Digest Messages
  545. ===============
  546.  
  547.    A "digest message" is a message which exists to contain and carry
  548. several other messages.  Digests are used on some moderated mailing
  549. lists; all the messages that arrive for the list during a period of time
  550. such as one day are put inside a single digest which is then sent to the
  551. subscribers.  Transmitting the single digest uses much less computer
  552. time than transmitting the individual messages even though the total
  553. size is the same, because the per-message overhead in network mail
  554. transmission is considerable.
  555.  
  556.    When you receive a digest message, the most convenient way to read
  557. it is to "undigestify" it: to turn it back into many individual
  558. messages.  Then you can read and delete the individual messages as it
  559. suits you.
  560.  
  561.    To do this, select the digest message and type the command `M-x
  562. undigestify-rmail-message'.  This extracts the submessages as separate
  563. Rmail messages, and inserts them following the digest.  The digest
  564. message itself is flagged as deleted.
  565.  
  566. 
  567. File: emacs,  Node: Out of Rmail,  Next: Rmail Rot13,  Prev: Rmail Digest,  Up: Rmail
  568.  
  569. Converting an Rmail File to Inbox Format
  570. ========================================
  571.  
  572.    The command `M-x unrmail' converts a file in Rmail format to inbox
  573. format (also known as the system mailbox format), so that you can use it
  574. with other mail-editing tools.  You must specify two arguments, the name
  575. of the Rmail file and the name to use for the converted file.  `M-x
  576. unrmail' does not alter the Rmail file itself.
  577.  
  578. 
  579. File: emacs,  Node: Rmail Rot13,  Prev: Out of Rmail,  Up: Rmail
  580.  
  581. Reading Rot13 Messages
  582. ======================
  583.  
  584.    Mailing list messages that might offend some readers are sometimes
  585. encoded in a simple code called "rot13"--so named because it rotates
  586. the alphabet by 13 letters.  This code is not for secrecy, as it
  587. provides none; rather, it enables those who might be offended to avoid
  588. ever seeing the real text of the message.
  589.  
  590.    To view a buffer using the rot13 code, use the command `M-x
  591. rot13-other-window'.  This displays the current buffer in another window
  592. which applies the code when displaying the text.
  593.  
  594. 
  595. File: emacs,  Node: Dired,  Next: Calendar/Diary,  Prev: Rmail,  Up: Top
  596.  
  597. Dired, the Directory Editor
  598. ***************************
  599.  
  600.    Dired makes an Emacs buffer containing a listing of a directory, and
  601. optionally some of its subdirectories as well.  You can use the normal
  602. Emacs commands to move around in this buffer, and special Dired commands
  603. to operate on the files listed.
  604.  
  605. * Menu:
  606.  
  607. * Enter: Dired Enter.         How to invoke Dired.
  608. * Commands: Dired Commands.   Commands in the Dired buffer.
  609. * Deletion: Dired Deletion.   Deleting files with Dired.
  610. * Flagging Many Files::       Flagging files based on their names.
  611. * Visit: Dired Visiting.      Other file operations through Dired.
  612. * Marks vs Flags::          Flagging for deletion vs marking.
  613. * Operating on Files::          How to copy, rename, print, compress, etc.
  614.                     either one file or several files.
  615. * Shell Commands in Dired::   Running a shell command on the marked files.
  616. * Transforming File Names::   Using patterns to rename multiple files.
  617. * Comparison in Dired::          Running `diff' by way of Dired.
  618. * Subdirectories in Dired::   Adding subdirectories to the Dired buffer.
  619. * Subdirectory Motion::          Moving across subdirectories, and up and down.
  620. * Hiding Subdirectories::     Making subdirectories visible or invisible.
  621. * Updating: Dired Updating.   Discarding lines for files of no interest.
  622. * Find: Dired and Find.          Using `find' to choose the files for Dired.
  623.  
  624. 
  625. File: emacs,  Node: Dired Enter,  Next: Dired Commands,  Up: Dired
  626.  
  627. Entering Dired
  628. ==============
  629.  
  630.    To invoke Dired, do `C-x d' or `M-x dired'.  The command reads a
  631. directory name or wildcard file name pattern as a minibuffer argument
  632. to specify which files to list.  Where `dired' differs from
  633. `list-directory' is in putting the buffer into Dired mode so that the
  634. special commands of Dired are available.
  635.  
  636.    The variable `dired-listing-switches' specifies the options to give
  637. to `ls' for listing directory; this string *must* contain `-l'.  If you
  638. use a numeric prefix argument with the `dired' command, you can specify
  639. the `ls' switches with the minibuffer after you finish entering the
  640. directory specification.
  641.  
  642.    To display the Dired buffer in another window rather than in the
  643. selected window, use `C-x 4 d' (`dired-other-window)' instead of `C-x
  644. d'.  `C-x 5 d' (`dired-other-frame') uses a separate frame to display
  645. the Dired buffer.
  646.  
  647. 
  648. File: emacs,  Node: Dired Commands,  Next: Dired Deletion,  Prev: Dired Enter,  Up: Dired
  649.  
  650. Commands in the Dired Buffer
  651. ============================
  652.  
  653.    The Dired buffer is "read-only", and inserting text in it is not
  654. useful, so ordinary printing characters such as `d' and `x' are used
  655. for special Dired commands.  Some Dired commands "mark" or "flag" the
  656. "current file" (that is, the file on the current line); other commands
  657. operate on the marked files or on the flagged files.
  658.  
  659.    All the usual Emacs cursor motion commands are available in Dired
  660. buffers.  Some special purpose cursor motion commands are also
  661. provided.  The keys `C-n' and `C-p' are redefined to put the cursor at
  662. the beginning of the file name on the line, rather than at the
  663. beginning of the line.
  664.  
  665.    For extra convenience, SPC and `n' in Dired are equivalent to `C-n'.
  666. `p' is equivalent to `C-p'.  (Moving by lines is so common in Dired
  667. that it deserves to be easy to type.)  DEL (move up and unflag) is
  668. often useful simply for moving up.
  669.  
  670. 
  671. File: emacs,  Node: Dired Deletion,  Next: Flagging Many Files,  Prev: Dired Commands,  Up: Dired
  672.  
  673. Deleting Files with Dired
  674. =========================
  675.  
  676.    The primary use of Dired is to "flag" files for deletion and then
  677. delete the files previously flagged.
  678.  
  679. `d'
  680.      Flag this file for deletion.
  681.  
  682. `u'
  683.      Remove deletion flag on this line.
  684.  
  685. `DEL'
  686.      Move point to previous line and remove the deletion flag on that
  687.      line.
  688.  
  689. `x'
  690.      Delete the files that are flagged for deletion.
  691.  
  692.    You can flag a file for deletion by moving to the line describing the
  693. file and typing `d'.  The deletion flag is visible as a `D' at the
  694. beginning of the line.  This command moves point to the next line, so
  695. that repeated `d' commands flag successive files.  A numeric argument
  696. serves as a repeat count.
  697.  
  698.    The files are flagged for deletion rather than deleted immediately to
  699. reduce the danger of deleting a file accidentally.  Until you direct
  700. Dired to expunge the flagged files, you can remove deletion flags using
  701. the commands `u' and DEL.  `u' works just like `d', but removes flags
  702. rather than making flags.  DEL moves upward, removing flags; it is like
  703. `u' with numeric argument automatically negated.
  704.  
  705.    To delete the flagged files, type `x' (`dired-expunge').  This
  706. command first displays a list of all the file names flagged for
  707. deletion, and requests confirmation with `yes'.  If you confirm, Dired
  708. deletes the flagged files, then deletes their lines from the text of
  709. the Dired buffer.  The shortened Dired buffer remains selected.
  710.  
  711.    If you answer `no' or quit with `C-g' when asked to confirm, you
  712. return immediately to Dired, with the deletion flags still present in
  713. the buffer, and no files actually deleted.
  714.  
  715. 
  716. File: emacs,  Node: Flagging Many Files,  Next: Dired Visiting,  Prev: Dired Deletion,  Up: Dired
  717.  
  718. Flagging Many Files
  719. ===================
  720.  
  721. `#'
  722.      Flag all auto-save files (files whose names start and end with `#')
  723.      for deletion (*note Auto Save::.).
  724.  
  725. `~'
  726.      Flag all backup files (files whose names end with `~') for deletion
  727.      (*note Backup::.).
  728.  
  729. `. (Period)'
  730.      Flag excess numeric backup files for deletion.  The oldest and
  731.      newest few backup files of any one file are exempt; the middle
  732.      ones are flagged.
  733.  
  734. `% d REGEXP RET'
  735.      Flag for deletion all files whose names match the regular
  736.      expression REGEXP (`dired-flag-files-regexp').
  737.  
  738.    The `#', `~' and `.' commands flag many files for deletion, based on
  739. their file names.  These commands are useful precisely because they do
  740. not actually delete any files; you can remove the deletion flags from
  741. any flagged files that you really wish to keep.
  742.  
  743.    `#' flags for deletion all files whose names look like auto-save
  744. files (*note Auto Save::.)--that is, files whose names begin and end
  745. with `#'.  `~' flags for deletion all files whose names say they are
  746. backup files (*note Backup::.)--that is, whose names end in `~'.
  747.  
  748.    `.' (Period) flags just some of the backup files for deletion: all
  749. but the oldest few and newest few backups of any one file.  Normally
  750. `dired-kept-versions' (*not* `kept-new-versions'; that applies only
  751. when saving) specifies the number of newest versions of each file to
  752. keep, and `kept-old-versions' specifies the number of oldest versions
  753. to keep.
  754.  
  755.    Period with a positive numeric argument, as in `C-u 3 .', specifies
  756. the number of newest versions to keep, overriding
  757. `dired-kept-versions'.  A negative numeric argument overrides
  758. `kept-old-versions', using minus the value of the argument to specify
  759. the number of oldest versions of each file to keep.
  760.  
  761.    The `% d' command flags all files whose names match a specified
  762. regular expression (`dired-flag-files-regexp').  Only the non-directory
  763. part of the file name is used in matching.  You can use `^' and `$' to
  764. anchor matches.  You can exclude subdirectories by hiding them (*note
  765. Hiding Subdirectories::.).
  766.  
  767. 
  768. File: emacs,  Node: Dired Visiting,  Next: Marks vs Flags,  Prev: Flagging Many Files,  Up: Dired
  769.  
  770. Visiting Files in Dired
  771. =======================
  772.  
  773.    There are several Dired commands for visiting or examining the files
  774. listed in the Dired buffer.  All of them apply to the current line's
  775. file; if that file is really a directory, these commands invoke Dired on
  776. that subdirectory (making a separate Dired buffer).
  777.  
  778. `f'
  779.      Visit the file described on the current line, like typing `C-x C-f'
  780.      and supplying that file name (`dired-find-file').  *Note
  781.      Visiting::.
  782.  
  783. `RET'
  784.      Equivalent to `f'.
  785.  
  786. `o'
  787.      Like `f', but uses another window to display the file's buffer
  788.      (`dired-find-file-other-window').  The Dired buffer remains visible
  789.      in the first window.  This is like using `C-x 4 C-f' to visit the
  790.      file.  *Note Windows::.
  791.  
  792. `C-o'
  793.      Visit the file described on the current line, and display the
  794.      buffer in another window, but do not select that window
  795.      (`dired-display-file').
  796.  
  797. `Mouse-2'
  798.      Visit the file named by the line you click on
  799.      (`dired-mouse-find-file-other-window').  This uses another window
  800.      to display the file, like the `o' command.
  801.  
  802. `v'
  803.      View the file described on the current line, using `M-x view-file'
  804.      (`dired-view-file').
  805.  
  806.      Viewing a file is like visiting it, but is slanted toward moving
  807.      around in the file conveniently and does not allow changing the
  808.      file.  *Note View File: Misc File Ops.
  809.  
  810. 
  811. File: emacs,  Node: Marks vs Flags,  Next: Operating on Files,  Prev: Dired Visiting,  Up: Dired
  812.  
  813. Dired Marks vs. Flags
  814. =====================
  815.  
  816.    Instead of flagging a file with `D', you can "mark" the file with
  817. some other character (usually `*').  Most Dired commands to operate on
  818. files, aside from "expunge" (`x'), look for files marked with `*'.
  819.  
  820.    Here are some commands for marking with `*' (and also for
  821. unmarking).  (*Note Dired Deletion::, for commands to flag and unflag
  822. files.)
  823.  
  824. `m'
  825.      Mark the current file with `*' (`dired-mark').  With a numeric
  826.      argument N, mark the next N files starting with the current file.
  827.      (If N is negative, mark the previous -N files.)
  828.  
  829. `*'
  830.      Mark all executable files with `*' (`dired-mark-executables').
  831.      With a numeric argument, unmark all those files.
  832.  
  833. `@'
  834.      Mark all symbolic links with `*' (`dired-mark-symlinks').  With a
  835.      numeric argument, unmark all those files.
  836.  
  837. `/'
  838.      Mark with `*' all files which are actually directories, except for
  839.      `.' and `..' (`dired-mark-directories').  With a numeric argument,
  840.      unmark all those files.
  841.  
  842. `M-DEL MARKCHAR'
  843.      Remove all marks that use the character MARKCHAR
  844.      (`dired-unmark-all-files').  If you specify RET as MARKCHAR, this
  845.      command removes all marks, no matter what the marker character is.
  846.  
  847.      With a numeric argument, this command queries about each marked
  848.      file, asking whether to remove its mark.  You can answer `y'
  849.      meaning yes, `n' meaning no, `!' to remove the marks from the
  850.      remaining files without asking about them.
  851.  
  852. `c OLD NEW'
  853.      Replace all marks that use the character OLD with marks that use
  854.      the character NEW (`dired-change-marks').  This command is the
  855.      primary way to create or use marks other than `*' or `D'.  The
  856.      arguments are single characters--do not use RET to terminate them.
  857.  
  858.      You can use almost any character as a mark character by means of
  859.      this command, to distinguish various classes of files.  If OLD is a
  860.      space (` '), then the command operates on all unmarked files; if
  861.      NEW is a space, then the command unmarks the files it acts on.
  862.  
  863.      To illustrate the power of this command, here is how to put `*'
  864.      marks on all the files that are unmarked, while unmarking all
  865.      those that have `*' marks:
  866.  
  867.           c * t  c SPC *  c t SPC
  868.  
  869. `% m REGEXP RET'
  870.      Mark (with `*') all files whose names match the regular expression
  871.      REGEXP (`dired-mark-files-regexp').  `% m' is like `% d', except
  872.      that it marks files with `*' instead of flagging with `D'.  *Note
  873.      Flagging Many Files::.
  874.  
  875.      Only the non-directory part of the file name is used in matching.
  876.      Use `^' and `$' to anchor matches.  Exclude subdirectories by
  877.      hiding them (*note Hiding Subdirectories::.).
  878.  
  879. 
  880. File: emacs,  Node: Operating on Files,  Next: Shell Commands in Dired,  Prev: Marks vs Flags,  Up: Dired
  881.  
  882. Operating on Files
  883. ==================
  884.  
  885.    This section describes the basic Dired commands to operate on one
  886. file or several files.  All of these commands are capital letters; all
  887. of them use the minibuffer, either to read an argument or to ask for
  888. confirmation, before they act.  All use the following convention to
  889. decide which files to manipulate:
  890.  
  891.    * If you give the command a numeric prefix argument N, it operates
  892.      on the next N files, starting with the current file.  (If N is
  893.      negative, the command operates on the -N files preceding the
  894.      current line.)
  895.  
  896.    * Otherwise, if some files are marked with `*', the command operates
  897.      on all those files.
  898.  
  899.    * Otherwise, the command operates on the current file only.
  900.  
  901.    Here are the file-manipulating commands that operate on files in this
  902. way.  (Some other Dired commands, such as `!' and the `%' commands,
  903. also use these conventions to decide which files to work on.)
  904.  
  905. `C NEW RET'
  906.      Copy the specified files (`dired-do-copy').  The argument NEW is
  907.      the directory to copy into, or (if copying a single file) the new
  908.      name.
  909.  
  910.      If `dired-copy-preserve-time' is non-`nil', then copying with this
  911.      command sets the modification time of the new file to be the same
  912.      as that of the old file.
  913.  
  914. `R NEW RET'
  915.      Rename the specified files (`dired-do-rename').  The argument NEW
  916.      is the directory to rename into, or (if renaming a single file)
  917.      the new name.
  918.  
  919.      Dired automatically changes the visited file name of buffers
  920.      associated with renamed files so that they refer to the new names.
  921.  
  922. `H NEW RET'
  923.      Make hard links to the specified files (`dired-do-hardlink').  The
  924.      argument NEW is the directory to make the links in, or (if making
  925.      just one link) the name to give the link.
  926.  
  927. `S NEW RET'
  928.      Make symbolic links to the specified files (`dired-do-symlink').
  929.      The argument NEW is the directory to make the links in, or (if
  930.      making just one link) the name to give the link.
  931.  
  932. `M MODESPEC RET'
  933.      Change the mode (also called "permission bits") of the specified
  934.      files (`dired-do-chmod').  This uses the `chmod' program, so
  935.      MODESPEC can be any argument that `chmod' can handle.
  936.  
  937. `G NEWGROUP RET'
  938.      Change the group of the specified files to NEWGROUP
  939.      (`dired-do-chgrp').
  940.  
  941. `O NEWOWNER RET'
  942.      Change the owner of the specified files to NEWOWNER
  943.      (`dired-do-chown').  (On most systems, only the superuser can do
  944.      this.)
  945.  
  946.      The variable `dired-chown-program' specifies the name of the
  947.      program to use to do the work (different systems put `chown' in
  948.      different places).
  949.  
  950. `P COMMAND RET'
  951.      Print the specified files (`dired-do-print').  You must specify the
  952.      command to print them with, but the minibuffer starts out with a
  953.      suitable guess made using the variables `lpr-command' and
  954.      `lpr-switches' (the same variables that `lpr-file' uses; *note
  955.      Hardcopy::.).
  956.  
  957. `Z'
  958.      Compress or uncompress the specified files (`dired-do-compress').
  959.      If the file appears to be a compressed file, it is uncompressed;
  960.      otherwise, it is compressed.
  961.  
  962. `L'
  963.      Load the specified Emacs Lisp files (`dired-do-load').  *Note Lisp
  964.      Libraries::.
  965.  
  966. `B'
  967.      Byte compile the specified Emacs Lisp files
  968.      (`dired-do-byte-compile').  *Note Byte Compilation: (elisp)Byte
  969.      Compilation.
  970.  
  971. `A REGEXP RET'
  972.      Search all the specified files for the regular expression REGEXP
  973.      (`dired-do-search').
  974.  
  975.      This command is a variant of `tags-search'.  The search stops at
  976.      the first match it finds; use `M-,' to resume the search and find
  977.      the next match.  *Note Tags Search::.
  978.  
  979. `Q FROM RET TO RET'
  980.      Perform `query-replace-regexp' on each of the specified files,
  981.      replacing matches for FROM (a regular expression) with the string
  982.      TO (`dired-do-query-replace').
  983.  
  984.      This command is a variant of `tags-query-replace'.  If you exit the
  985.      query replace loop, you can use `M-,' to resume the scan and
  986.      replace more matches.  *Note Tags Search::.
  987.  
  988.    One special file-operation command is `+'
  989. (`dired-create-directory').  This command reads a directory name and
  990. creates the directory if it does not already exist.
  991.  
  992. 
  993. File: emacs,  Node: Shell Commands in Dired,  Next: Transforming File Names,  Prev: Operating on Files,  Up: Dired
  994.  
  995. Shell Commands in Dired
  996. =======================
  997.  
  998.    The dired command `!' (`dired-do-shell-command') reads a shell
  999. command string in the minibuffer and runs that shell command on all the
  1000. specified files.  There are two ways of applying a shell command to
  1001. multiple files:
  1002.  
  1003.    * If you use `*' in the shell command, then it runs just once, with
  1004.      the list of file names substituted for the `*'.  The order of file
  1005.      names is the order of appearance in the Dired buffer.
  1006.  
  1007.      Thus, `! tar cf foo.tar * RET' runs `tar' on the entire list of
  1008.      file names, putting them into one tar file `foo.tar'.
  1009.  
  1010.    * If the command string doesn't contain `*', then it runs once *for
  1011.      each file*, with the file name added at the end.
  1012.  
  1013.      For example, `! uudecode RET' runs `uudecode' on each file.
  1014.  
  1015.    What if you want to run the shell command once for each file but with
  1016. the file name inserted in the middle?  Or if you want to use the file
  1017. names in a more complicated fashion?  Use a shell loop.  For example,
  1018. this shell command would run `uuencode' on each of the specified files,
  1019. writing the output into a corresponding `.uu' file:
  1020.  
  1021.      for file in *; uuencode $file $file >$file.uu; done
  1022.  
  1023.    The working directory for the shell command is the top level
  1024. directory of the Dired buffer.
  1025.  
  1026.    The `!' command does not attempt to update the Dired buffer to show
  1027. new or modified files, because it doesn't really understand shell
  1028. commands, and does not know what files the shell command changed.  Use
  1029. the `g' command to update the Dired buffer (*note Dired Updating::.).
  1030.  
  1031. 
  1032. File: emacs,  Node: Transforming File Names,  Next: Comparison in Dired,  Prev: Shell Commands in Dired,  Up: Dired
  1033.  
  1034. Transforming File Names in Dired
  1035. ================================
  1036.  
  1037.    Here are commands that alter file names in a systematic way:
  1038.  
  1039. `% u'
  1040.      Rename each of the selected files to an upper case name
  1041.      (`dired-upcase').  If the old file names are `Foo' and `bar', the
  1042.      new names are `FOO' and `BAR'.
  1043.  
  1044. `% l'
  1045.      Rename each of the selected files to a lower case name
  1046.      (`dired-downcase').  If the old file names are `Foo' and `bar',
  1047.      the new names are `foo' and `bar'.
  1048.  
  1049. `% R FROM RET TO RET'
  1050. `% C FROM RET TO RET'
  1051. `% H FROM RET TO RET'
  1052. `% S FROM RET TO RET'
  1053.      These four commands rename, copy, make hard links and make soft
  1054.      links, in each case computing the new name by regular expression
  1055.      substitution from the name of the old file.
  1056.  
  1057.    The four regular expression substitution commands effectively perform
  1058. a search-and-replace on the selected file names in the Dired buffer.
  1059. They read two arguments: a regular expression FROM, and a substitution
  1060. pattern TO.
  1061.  
  1062.    The commands match each "old" file name against the regular
  1063. expression FROM, and then replace the matching part with TO.  You can
  1064. use `\&' and `\DIGIT' in TO to refer to all or part of what the pattern
  1065. matched in the old file name, as in `query-replace-regexp' (*note Query
  1066. Replace::.).  If the regular expression matches more than once in a
  1067. file name, only the first match is replaced.
  1068.  
  1069.    For example, `% R ^.*$ RET x-\& RET' renames each selected file by
  1070. prepending `x-' to its name.  The inverse of this, removing `x-' from
  1071. the front of each file name, is also possible: one method is `% R
  1072. ^x-\(.*\)$ RET \1 RET'; another is `% R ^x- RET RET'.  (Use `^' and `$'
  1073. to anchor matches that should span the whole filename.)
  1074.  
  1075.    Normally, the replacement process does not consider the files'
  1076. directory names; it operates on the file name within the directory.  If
  1077. you specify a numeric argument of zero, then replacement affects the
  1078. entire absolute file name including directory name.
  1079.  
  1080.    Often you will want to apply the command to all files matching the
  1081. same REGEXP that you use in the command.  To do this, mark those files
  1082. with `% m REGEXP RET', then use the same regular expression in the
  1083. command to operate on the files.  To make this easier, the `%' commands
  1084. to operate on files use the last regular expression specified in any
  1085. `%' command as a default.
  1086.  
  1087. 
  1088. File: emacs,  Node: Comparison in Dired,  Next: Subdirectories in Dired,  Prev: Transforming File Names,  Up: Dired
  1089.  
  1090. File Comparison with Dired
  1091. ==========================
  1092.  
  1093.    Here are two Dired commands that compare specified files using
  1094. `diff'.
  1095.  
  1096. `='
  1097.      Compare the current file (the file at point) with another file
  1098.      (the file at the mark) using the `diff' program (`dired-diff').
  1099.      The file at the mark is the first argument of `diff', and the file
  1100.      at point is the second argument.
  1101.  
  1102. `M-='
  1103.      Compare the current file with its latest backup file
  1104.      (`dired-backup-diff').  If the current file is itself a backup,
  1105.      compare it with the file it is a backup of; this way, you can
  1106.      compare a file with any backup version of your choice.
  1107.  
  1108.      The backup file is the first file given to `diff'.
  1109.  
  1110. 
  1111. File: emacs,  Node: Subdirectories in Dired,  Next: Subdirectory Motion,  Prev: Comparison in Dired,  Up: Dired
  1112.  
  1113. Subdirectories in Dired
  1114. =======================
  1115.  
  1116.    A Dired buffer displays just one directory in the normal case; but
  1117. you can optionally include its subdirectories as well.
  1118.  
  1119.    The simplest way to include multiple directories in one Dired buffer
  1120. is to specify the options `-lR' for running `ls'.  (If you give a
  1121. numeric argument when you run Dired, then you can specify these options
  1122. in the minibuffer.)  That produces a recursive directory listing showing
  1123. all subdirectories at all levels.
  1124.  
  1125.    But usually all the subdirectories are too many; usually you will
  1126. prefer to include specific subdirectories only.  You can do this with
  1127. the `i' command:
  1128.  
  1129. `i'
  1130.      Insert the contents of a subdirectory later in the buffer.
  1131.  
  1132.    Use the `i' (`dired-maybe-insert-subdir') command on a line that
  1133. describes a file which is a directory.  It inserts the contents of that
  1134. directory into the same Dired buffer, and moves there.  Inserted
  1135. subdirectory contents follow the top-level directory of the Dired
  1136. buffer, just as they do in `ls -lR' output.
  1137.  
  1138.    If the subdirectory's contents are already present in the buffer, the
  1139. `i' command just moves to it.
  1140.  
  1141.    In either case, `i' sets the Emacs mark before moving, so `C-u
  1142. C-SPC' takes you back to the old position in the buffer (the line
  1143. describing that subdirectory).
  1144.  
  1145.    Use the `l' command (`dired-do-redisplay') to update the
  1146. subdirectory's contents.  Use `k' to delete the subdirectory.  *Note
  1147. Dired Updating::.
  1148.  
  1149. 
  1150. File: emacs,  Node: Subdirectory Motion,  Next: Hiding Subdirectories,  Prev: Subdirectories in Dired,  Up: Dired
  1151.  
  1152. Moving Over Subdirectories
  1153. ==========================
  1154.  
  1155.    When a Dired buffer lists subdirectories, you can use the page motion
  1156. commands `C-x [' and `C-x ]' to move by entire directories.
  1157.  
  1158.    The following commands move across, up and down in the tree of
  1159. directories within one Dired buffer.  They move to "directory header
  1160. lines", which are the lines that give a directory's name, at the
  1161. beginning of the directory's contents.
  1162.  
  1163. `C-M-n'
  1164.      Go to next subdirectory header line, regardless of level
  1165.      (`dired-next-subdir').
  1166.  
  1167. `C-M-p'
  1168.      Go to previous subdirectory header line, regardless of level
  1169.      (`dired-prev-subdir').
  1170.  
  1171. `C-M-u'
  1172.      Go up to the parent directory's header line (`dired-tree-up').
  1173.  
  1174. `C-M-d'
  1175.      Go down in the directory tree, to the first subdirectory's header
  1176.      line (`dired-tree-down').
  1177.  
  1178. 
  1179. File: emacs,  Node: Hiding Subdirectories,  Next: Dired Updating,  Prev: Subdirectory Motion,  Up: Dired
  1180.  
  1181. Hiding Subdirectories
  1182. =====================
  1183.  
  1184.    "Hiding" a subdirectory means to make it invisible, except for its
  1185. header line, via selective display (*note Selective Display::.).
  1186.  
  1187. `$'
  1188.      Hide or reveal the subdirectory that point is in, and move point
  1189.      to the next subdirectory (`dired-hide-subdir').  A numeric
  1190.      argument serves as a repeat count.
  1191.  
  1192. `M-$'
  1193.      Hide all subdirectories in this Dired buffer, leaving only their
  1194.      header lines (`dired-hide-all').  Or, if any subdirectory is
  1195.      currently hidden, make all subdirectories visible again.  You can
  1196.      use this command to get an overview in very deep directory trees
  1197.      or to move quickly to subdirectories far away.
  1198.  
  1199.    Ordinary Dired commands never consider files inside a hidden
  1200. subdirectory.  For example, the commands to operate on marked files
  1201. ignore files in hidden directories even if they are marked.  Thus you
  1202. can use hiding to temporarily exclude subdirectories from operations
  1203. without having to remove the markers.
  1204.  
  1205.    The subdirectory hiding commands toggle; that is, they hide what was
  1206. visible, and show what was hidden.
  1207.  
  1208.